package cn.mesmile.order.fallback;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.math.BigDecimal;

/**
 * @author zb
 * @date 2020/12/16 18:34
 * @Description
 */
@FeignClient(name = "xdclass-seata-account",fallbackFactory = AccountServiceClientFallbackFactory.class)
public interface AccountServiceClient {

    /**
     *  扣除账户余额
     * @param accountId
     * @param price
     * @return
     */
    @GetMapping("/api/v1/account/deduct/{accountId}/{price}")
    Boolean deductBalance(@PathVariable("accountId")Long accountId, @PathVariable("price") BigDecimal price);

}
